package com.divemotor.ventarepuestosinternet.service.impl;

import java.io.Serializable;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

import com.divemotor.ventarepuestosinternet.beans.adapter.VehiculoAdapter;
import com.divemotor.ventarepuestosinternet.beans.form.VehiculoBeanForm;
import com.divemotor.ventarepuestosinternet.dao.VehiculoDAO;
import com.divemotor.ventarepuestosinternet.exception.DivemotorBusinessException;
import com.divemotor.ventarepuestosinternet.service.MisVehiculosService;

@Service(value = "misVehiculosService")
@Transactional(rollbackFor=Exception.class)
public class MisVehiculosServiceImpl implements MisVehiculosService, Serializable {

	private static final long serialVersionUID = 1L;

	@Autowired
	private VehiculoDAO vehiculoDAO;
	
	@Override
	public List<VehiculoAdapter> buscar(VehiculoBeanForm vehiculoBean) throws DivemotorBusinessException {
		return vehiculoDAO.listarPorCliente(vehiculoBean);
	}

}
